/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.msk.base.domain.goodsMember;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.msk.common.utils.DictUtils;
import com.msk.sys.domain.DataEntity;
import com.msk.sys.domain.Office;
import com.msk.sys.domain.User;
import com.msk.wlhy.domain.HtCompany;
import org.apache.commons.lang3.StringUtils;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * <p>
 * []
 * </p>
 * <p>
 * 作者：lh
 * </p>
 * <p>
 * 邮箱：lh@xiangyou.com
 * </p>
 * <p>
 * 创建时间： 2018-11-30
 * </p>
 * <p>
 * 类说明：修改信息Entity
 * </p>
 * <p>
 * 修改记录：
 * </p>
 */
public class GoodsMember extends DataEntity<GoodsMember> {

	private static final long serialVersionUID = 1L;
	//姓名
	private String name;
	private String mobile;
	//身份证号
	private String cardNo;
	private String sex;
	private Integer age;
	//营业执照、身份证照片
	private String picture;
	//公司名称
	private String comName;
	private Date startDate;
	private Date endDate;
	private String area;
	private String openId;
	private String auditStatus;
	private User auditUser;
	private String auditUserName;
	private String auditContent;
	private Office office;
	private Office company;
	private String attribute01;
	private String attribute02;
	private String attribute03;
	private String attribute04;
	private String attribute05;
	private String attribute06;
	private Date attribute07;
	private Date attribute08;
	private String sexAlias; // 转换后的性别
	private String delFlagAlias; // 转换后的删除标志
	private String auditStatusAlias; // 转换后的审核状态
	private User user;// 用户信息
	private HtCompany company1;//客户信息

	//0：自然人货主；1企业货主
	private String memberType;//货主分类
	//法人姓名
	private String legelName;
	//社会统一代码
	private String unifiedSocialCode;
	private String mailAddress;//通讯地址

	private String contactsName;//联系人

	private String contactsPhone;//联系电话
	//法人电话
	private String legelPhone;
	//详细地址
	private String detailAddress;
	//委托书
	private String letterAttorney;
	private String baseOpenAccountName;//开户行名称
	private String baseOpenAccountInfo;//开户行账号
	private String baseOpenType;//开户行类别
	private String baseOpenAddress;//开户行地址
	//所在区域(code)
	private String gmArea;
	private String gmAreaName;
	//法人身份证
	private String legalIdCardNo;
	//法人身份证正面（国徽）
	private String legalIdCardFront;
	//法人身份证反面（人像）
	private String legalIdCardBack;
	//一般纳税人
	private String generalTaxpayer;
	private String userId;//用户Id

	//按照时间搜索
	private String createDate1;
	private String createDate2;

	private Date auditTime;//审核时间
	private String auditTime0;
	private String auditTime1;

	/**
	 * 以下四个属性为货主自然人数据传递使用
	 */

	private String personPhone;//自然人联系电话
	private String personDetailAddress;//自然人详细地址
	private String personGmArea;//自然人区域ID
	private String personGmAreaName;//自然人区域
	private String personUserId;
	private String personId;
	private String personVersion;
	private String personBaseOpenAddress;
	private String personBaseOpenAccountInfo;
	private String personBaseOpenType;
	private String personBaseOpenAccountName;
	private String personMemberType;

	//自然人身份证正面（人像）
	private String idCardFront;
	//自然人身份证反面（人像）
	private String idCardBack;

	private String flag;
	private String memberLevel;//货主等级
	private String memberLevelAlias;//货主等级展示

	/**
	 * 部分导出使用
	 */
	private String[] idArray;

	public String getContactsName() {
		return contactsName;
	}

	public void setContactsName(String contactsName) {
		this.contactsName = contactsName;
	}

	public String getContactsPhone() {
		return contactsPhone;
	}

	public void setContactsPhone(String contactsPhone) {
		this.contactsPhone = contactsPhone;
	}

	public String getLegelPhone() {
		return legelPhone;
	}

	public void setLegelPhone(String legelPhone) {
		this.legelPhone = legelPhone;
	}

	public String getDetailAddress() {
		return detailAddress;
	}

	public void setDetailAddress(String detailAddress) {
		this.detailAddress = detailAddress;
	}

	public String getLetterAttorney() {
		return letterAttorney;
	}

	public void setLetterAttorney(String letterAttorney) {
		this.letterAttorney = letterAttorney;
	}

	public String getBaseOpenAccountName() {
		return baseOpenAccountName;
	}

	public void setBaseOpenAccountName(String baseOpenAccountName) {
		this.baseOpenAccountName = baseOpenAccountName;
	}

	public String getBaseOpenAccountInfo() {
		return baseOpenAccountInfo;
	}

	public void setBaseOpenAccountInfo(String baseOpenAccountInfo) {
		this.baseOpenAccountInfo = baseOpenAccountInfo;
	}

	public String getBaseOpenType() {
		return baseOpenType;
	}

	public void setBaseOpenType(String baseOpenType) {
		this.baseOpenType = baseOpenType;
	}

	public String getBaseOpenAddress() {
		return baseOpenAddress;
	}

	public void setBaseOpenAddress(String baseOpenAddress) {
		this.baseOpenAddress = baseOpenAddress;
	}

	public String getMemberType() {
		return memberType;
	}

	public void setMemberType(String memberType) {
		this.memberType = memberType;
	}

	public String getLegelName() {
		return legelName;
	}

	public void setLegelName(String legelName) {
		this.legelName = legelName;
	}

	public String getUnifiedSocialCode() {
		return unifiedSocialCode;
	}

	public void setUnifiedSocialCode(String unifiedSocialCode) {
		this.unifiedSocialCode = unifiedSocialCode;
	}

	public String getMailAddress() {
		return mailAddress;
	}

	public void setMailAddress(String mailAddress) {
		this.mailAddress = mailAddress;
	}

	public GoodsMember() {
		super();
	}

	public GoodsMember(String id) {
		super(id);
	}

	@Length(min = 0, max = 255, message = "货主姓名长度必须介于 0 和 255 之间")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Length(min = 0, max = 64, message = "手机号长度必须介于 0 和 64 之间")
	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	@Length(min = 0, max = 64, message = "身份证号长度必须介于 0 和 64 之间")
	public String getCardNo() {
		return cardNo;
	}

	public void setCardNo(String cardNo) {
		this.cardNo = cardNo;
	}

	@Length(min = 0, max = 32, message = "性别长度必须介于 0 和 32 之间")
	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public Integer getAge() {
		return age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	@Length(min = 0, max = 1024, message = "营业执照|身份证照片长度必须介于 0 和 1024 之间")
	public String getPicture() {
		return picture;
	}

	public void setPicture(String picture) {
		this.picture = picture;
	}

	@Length(min = 0, max = 255, message = "公司名称长度必须介于 0 和 255 之间")
	public String getComName() {
		return comName;
	}

	public void setComName(String comName) {
		this.comName = comName;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	@Length(min = 0, max = 255, message = "区域长度必须介于 0 和 255 之间")
	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}

	@Length(min = 0, max = 255, message = "openId长度必须介于 0 和 255 之间")
	public String getOpenId() {
		return openId;
	}

	public void setOpenId(String openId) {
		this.openId = openId;
	}

	@Length(min = 0, max = 32, message = "审核状态 base_member_type长度必须介于 0 和 32 之间")
	public String getAuditStatus() {
		return auditStatus;
	}

	public void setAuditStatus(String auditStatus) {
		this.auditStatus = auditStatus;
	}

	public User getAuditUser() {
		return auditUser;
	}

	public void setAuditUser(User auditUser) {
		this.auditUser = auditUser;
	}

	public String getAuditUserName() {
		if(auditUser != null && StringUtils.isNotBlank(auditUser.getName())){
			return auditUser.getName();
		}
		return auditUserName;
	}

	public void setAuditUserName(String auditUserName) {
		this.auditUserName = auditUserName;
	}

	@Length(min = 0, max = 255, message = "审核意见长度必须介于 0 和 255 之间")
	public String getAuditContent() {
		return auditContent;
	}

	public void setAuditContent(String auditContent) {
		this.auditContent = auditContent;
	}

	@NotNull(message = "部门不能为空")
	public Office getOffice() {
		return office;
	}

	public void setOffice(Office office) {
		this.office = office;
	}

	@NotNull(message = "公司不能为空")
	public Office getCompany() {
		return company;
	}

	public void setCompany(Office company) {
		this.company = company;
	}

	@Length(min = 1, max = 255, message = "attribute01长度必须介于 1 和 255 之间")
	public String getAttribute01() {
		return attribute01;
	}

	public void setAttribute01(String attribute01) {
		this.attribute01 = attribute01;
	}

	@Length(min = 1, max = 255, message = "attribute02长度必须介于 1 和 255 之间")
	public String getAttribute02() {
		return attribute02;
	}

	public void setAttribute02(String attribute02) {
		this.attribute02 = attribute02;
	}

	@Length(min = 1, max = 255, message = "attribute03长度必须介于 1 和 255 之间")
	public String getAttribute03() {
		return attribute03;
	}

	public void setAttribute03(String attribute03) {
		this.attribute03 = attribute03;
	}

	@Length(min = 1, max = 255, message = "attribute04长度必须介于 1 和 255 之间")
	public String getAttribute04() {
		return attribute04;
	}

	public void setAttribute04(String attribute04) {
		this.attribute04 = attribute04;
	}

	@Length(min = 1, max = 255, message = "attribute05长度必须介于 1 和 255 之间")
	public String getAttribute05() {
		return attribute05;
	}

	public void setAttribute05(String attribute05) {
		this.attribute05 = attribute05;
	}

	@Length(min = 1, max = 255, message = "attribute06长度必须介于 1 和 255 之间")
	public String getAttribute06() {
		return attribute06;
	}

	public void setAttribute06(String attribute06) {
		this.attribute06 = attribute06;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getAttribute07() {
		return attribute07;
	}

	public void setAttribute07(Date attribute07) {
		this.attribute07 = attribute07;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getAttribute08() {
		return attribute08;
	}

	public void setAttribute08(Date attribute08) {
		this.attribute08 = attribute08;
	}

	public String getSexAlias() {
		if (StringUtils.isBlank(sexAlias)) {
			return DictUtils.getDictLabel(sex, "sex", "");
		}
		return sexAlias;
	}

	public void setSexAlias(String sexAlias) {
		this.sexAlias = sexAlias;
	}

	public String getDelFlagAlias() {
		if (StringUtils.isBlank(delFlagAlias)) {
			return DictUtils.getDictLabel(delFlag, "del_flag", "");
		}
		return delFlagAlias;
	}

	public void setAuditStatusAlias(String auditStatusAlias) {
		this.auditStatusAlias = auditStatusAlias;
	}

	public String getAuditStatusAlias() {
		if (StringUtils.isBlank(auditStatusAlias)) {
			return DictUtils.getDictLabel(auditStatus, "base_audit_status", "");
		}
		return auditStatusAlias;
	}

	public void setDelFlagAlias(String delFlagAlias) {
		this.delFlagAlias = delFlagAlias;
	}
	
	public String getLogTitle() {
		return "修改信息";
	}
	
//	public String getLogType() {
//		return Log.LogType.module_operate.name();
//	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public HtCompany getCompany1() {
		return company1;
	}

	public void setCompany1(HtCompany company1) {
		this.company1 = company1;
	}

	public String getGmArea() {
		return gmArea;
	}

	public void setGmArea(String gmArea) {
		this.gmArea = gmArea;
	}

	public String getGmAreaName() {
		return gmAreaName;
	}

	public void setGmAreaName(String gmAreaName) {
		this.gmAreaName = gmAreaName;
	}

	public String getLegalIdCardNo() {
		return legalIdCardNo;
	}

	public void setLegalIdCardNo(String legalIdCardNo) {
		this.legalIdCardNo = legalIdCardNo;
	}

	public String getLegalIdCardFront() {
		return legalIdCardFront;
	}

	public void setLegalIdCardFront(String legalIdCardFront) {
		this.legalIdCardFront = legalIdCardFront;
	}

	public String getLegalIdCardBack() {
		return legalIdCardBack;
	}

	public void setLegalIdCardBack(String legalIdCardBack) {
		this.legalIdCardBack = legalIdCardBack;
	}

	public String getGeneralTaxpayer() {
		return generalTaxpayer;
	}

	public void setGeneralTaxpayer(String generalTaxpayer) {
		this.generalTaxpayer = generalTaxpayer;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getCreateDate1() {
		return createDate1;
	}

	public void setCreateDate1(String createDate1) {
		this.createDate1 = createDate1;
	}

	public String getCreateDate2() {
		return createDate2;
	}

	public void setCreateDate2(String createDate2) {
		this.createDate2 = createDate2;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getAuditTime() {
		return auditTime;
	}

	public void setAuditTime(Date auditTime) {
		this.auditTime = auditTime;
	}

	public String getAuditTime0() {
		return auditTime0;
	}

	public void setAuditTime0(String auditTime0) {
		this.auditTime0 = auditTime0;
	}

	public String getAuditTime1() {
		return auditTime1;
	}

	public void setAuditTime1(String auditTime1) {
		this.auditTime1 = auditTime1;
	}

	public String getIdCardFront() {
		return idCardFront;
	}

	public void setIdCardFront(String idCardFront) {
		this.idCardFront = idCardFront;
	}

	public String getIdCardBack() {
		return idCardBack;
	}

	public void setIdCardBack(String idCardBack) {
		this.idCardBack = idCardBack;
	}

	public String getPersonPhone() {
		return personPhone;
	}

	public void setPersonPhone(String personPhone) {
		this.personPhone = personPhone;
	}

	public String getPersonDetailAddress() {
		return personDetailAddress;
	}

	public void setPersonDetailAddress(String personDetailAddress) {
		this.personDetailAddress = personDetailAddress;
	}

	public String getPersonGmArea() {
		return personGmArea;
	}

	public void setPersonGmArea(String personGmArea) {
		this.personGmArea = personGmArea;
	}

	public String getPersonGmAreaName() {
		return personGmAreaName;
	}

	public void setPersonGmAreaName(String personGmAreaName) {
		this.personGmAreaName = personGmAreaName;
	}

	public String getPersonUserId() {
		return personUserId;
	}

	public void setPersonUserId(String personUserId) {
		this.personUserId = personUserId;
	}

	public String getPersonId() {
		return personId;
	}

	public void setPersonId(String personId) {
		this.personId = personId;
	}

	public String getPersonVersion() {
		return personVersion;
	}

	public void setPersonVersion(String personVersion) {
		this.personVersion = personVersion;
	}

	public String getPersonBaseOpenAddress() {
		return personBaseOpenAddress;
	}

	public void setPersonBaseOpenAddress(String personBaseOpenAddress) {
		this.personBaseOpenAddress = personBaseOpenAddress;
	}

	public String getPersonBaseOpenAccountInfo() {
		return personBaseOpenAccountInfo;
	}

	public void setPersonBaseOpenAccountInfo(String personBaseOpenAccountInfo) {
		this.personBaseOpenAccountInfo = personBaseOpenAccountInfo;
	}

	public String getPersonBaseOpenType() {
		return personBaseOpenType;
	}

	public void setPersonBaseOpenType(String personBaseOpenType) {
		this.personBaseOpenType = personBaseOpenType;
	}

	public String getPersonBaseOpenAccountName() {
		return personBaseOpenAccountName;
	}

	public void setPersonBaseOpenAccountName(String personBaseOpenAccountName) {
		this.personBaseOpenAccountName = personBaseOpenAccountName;
	}

	public String getPersonMemberType() {
		return personMemberType;
	}

	public void setPersonMemberType(String personMemberType) {
		this.personMemberType = personMemberType;
	}

	public String getFlag() {
		return flag;
	}

	public void setFlag(String flag) {
		this.flag = flag;
	}

	public String getMemberLevel() {
		return memberLevel;
	}

	public void setMemberLevel(String memberLevel) {
		this.memberLevel = memberLevel;
	}

	public String getMemberLevelAlias() {
		if (StringUtils.isNotBlank(memberLevel)) {
			memberLevelAlias = DictUtils.getDictLabel(memberLevel, "member_level", "");
		}
		return memberLevelAlias;
	}

	public void setMemberLevelAlias(String memberLevelAlias) {
		this.memberLevelAlias = memberLevelAlias;
	}

	public String[] getIdArray() {
		return idArray;
	}

	public void setIdArray(String[] idArray) {
		this.idArray = idArray;
	}
}